/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

	PrintSample

		AboutDlg.cpp

			Message handler procedure for About dialog box.

 ------------------------------------------------------------------

 Copyright (c) 2010 Microsoft Corporation. All rights reserved.

 THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
 ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 
 PARTICULAR PURPOSE.

 ------------------------------------------------------------------
*/
#include "stdafx.h"
#include "PrintSample.h"

/** 
	<module>AboutDlg.cpp</module>

	<summary>
		Message handler for the About dialog box.</summary>

	<param name="hDlg">
		Handle to the dialog box window</param>

	<param name="message">
		Window message to process.</param>

	<param name="wParam">
		Paramter passed with window message. Usage depends on value of message parameter.</param>

	<param name="lParam">
		Paramter passed with window message. Usage depends on value of message parameter.</param>

	<returns>
		<p>(INT_PTR)TRUE if this procedure handled the message and not further processing is necessary</p>
        <p>(INT_PTR)FALSE if the message was not handled and the message should be handed by the dialog manager.</p></returns>

	<remarks>
		<p>This procedure handles the following window messages.</p>
		<p>WM_INITDIALOG: returns TRUE</p>
		<p>WM_COMMAND: ends dialog box when OK button is clicked</p>
		</remarks>

*/
INT_PTR CALLBACK 
AboutDlgProc(
		HWND hDlg, 
		UINT message, 
		WPARAM wParam, 
		LPARAM lParam
)
{
	UNREFERENCED_PARAMETER(lParam);
	switch (message)
	{
	case WM_INITDIALOG:
		return (INT_PTR)TRUE;

	case WM_COMMAND:
		if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
		{
			EndDialog(hDlg, LOWORD(wParam));
			return (INT_PTR)TRUE;
		}
		break;
	}
	return (INT_PTR)FALSE;
}

